package model

import (
	"gorm.io/gorm"
)

type Goods struct {
	gorm.Model
	GoodsName  string  `gorm:"type:varchar(100);not null;comment:商品名称;index:idx_member" json:"GoodsName"`
	GoodsSn    string  `gorm:"type:varchar(100);not null;comment:商品号" json:"GoodsSn"`
	ClickNum   int32   `gorm:"type:int(100);not null;comment:商品点赞量" json:"ClickNum"`
	SoldNum    int32   `gorm:"type:int(100);not null;comment:商品销售量" json:"SoldNum"`
	ShopPrice  float32 `gorm:"type:decimal(8,2);not null;comment:商品单价" json:"ShopPrice"`
	GoodsStock int64   `gorm:"type:int(100);not null;comment:商品库存" json:"GoodsStock"`
	GoodsDesc  string  `gorm:"type:varchar(255);not null;comment:商品简介" json:"GoodsDesc"`
	Status     int     `gorm:"type:tinyint(1);check:status IN (0,1);default:1;not null;comment:商品名称" json:"Status"`
}
